<template>
  <el-breadcrumb separator=">" id="bread">
    <el-breadcrumb-item :to="{ path: '/admin' }">主页</el-breadcrumb-item>
    <template  v-for="a in bread" :key="a">
      <el-breadcrumb-item v-if="a!=='home'"><PathToChinese :text="a"></PathToChinese></el-breadcrumb-item>
    </template>
  </el-breadcrumb>
</template>
<script>
export default {
  name: "Breadcrumb"
}
</script>
<script setup>
import {useStore} from 'vuex'
import {computed} from "vue";
import PathToChinese from "@/components/adminHome/PathToChinese";
const store = useStore()
const bread = computed(() => store.getters.bread.split('/').slice(2))
</script>
<style scoped>
.el-breadcrumb{
  line-height: 60px;
}
</style>